package com.ph.finder.server.data;

import javax.persistence.Entity;
import javax.persistence.Id;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.KeyFactory;

@Entity
public class DraftPrecinct {

  @Id
  private Key key;

  private String precinctId;

  private String ipAddress;

  private double lat;

  private double lng;

  public DraftPrecinct() {
	}

	public DraftPrecinct(String precinctId, String ipAddress, double lat,
			double lng) {
		super();
		this.precinctId = precinctId;
		this.ipAddress = ipAddress;
		this.lat = lat;
		this.lng = lng;

		key = KeyFactory.createKey("DraftPrecinct", precinctId);
		key = key.getChild("ip", ipAddress);
	}

	public Key getKey() {
		return key;
	}

	public String getPrecinctId() {
		return precinctId;
	}

	public String getIpAddress() {
		return ipAddress;
	}

	public double getLat() {
		return lat;
	}

	public double getLng() {
		return lng;
	}

}
